package com.tianshu.system.controller;


import com.tianshu.system.service.TApplyMainService;
import com.tianshu.system.vo.MgrVO;
import com.tianshu.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import com.tianshu.base.BaseController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 主申请表 前端控制器
 * </p>
 *
 * @author liaojie
 * @since 2021-11-17
 */
@RestController
@RequestMapping("/api")
public class TApplyMainController extends BaseController {

    @Autowired
    private TApplyMainService applyMainService;

    /**
     * 昨天面签前X
     * @return
     */
    @GetMapping("applyMainlist")
    private R applyMainlist() {
        List<Map> applyMainlist = applyMainService.applyMainlist();
        return R.data(applyMainlist);
    }

    /**
     *  昨天进件前X条
     * @return
     */
    @GetMapping("lncomingPartsList")
    private R lncomingPartsList() {
        List<Map> lncomingPartsList = applyMainService.lncomingPartsList();
        return R.data(lncomingPartsList);
    }

    /**
     * 网点进件
     * @param
     * @param
     * @return
     */
    @GetMapping("mapList")
    private R mapList() {
        List<Map> mapList = applyMainService.selectReturn();
        return R.data(mapList);
    }

    /**
     * 业务动态
     * @param startTime
     * @param endTime
     * @return
     */
    @GetMapping("dynamicMsg")
    private R dynamicMsg(String startTime,String endTime) {
        List<Map> dynamicMsg = applyMainService.getDynamicMsg(startTime, endTime);
        return R.data(dynamicMsg);
    }

    /**
     * 用信
     * @return
     */
    @GetMapping("getUseLetter")
    private R getUseLetter() {
        List<Map> dynamicMsg = applyMainService.getUseLetter();
        return R.data(dynamicMsg);
    }


    /**
     * 柱状图
     * @return
     */
    @GetMapping("getEcharts")
    private R getEcharts() {
        List<Map> echarts = applyMainService.getEcharts();
        return R.data(echarts);
    }
}

